const { defineConfig } = require('@vue/cli-service')
const path = require('path')

module.exports = defineConfig({
  transpileDependencies: true,
  lintOnSave: false,
  devServer: {
    host: '0.0.0.0',
    port: 8080,
    proxy: {
      '/springbootyyh3w': {
        target: 'http://localhost:8090/springbootyyh3w/',
        changeOrigin: true,
        pathRewrite: {
          '^/springbootyyh3w': ''
        }
      },
      '/assets/img': {
        target: 'http://localhost:8090',
        pathRewrite: {
          '^/assets/img': '/springbootyyh3w/src/main/resources/admin/admin/src/assets/img'
        }
      }
    }
  },
  // 别名配置
  configureWebpack: {
    resolve: {
      alias: {
        '@': path.resolve(__dirname, 'src')
      }
    }
  }
})
